{% extends 'base.html' %}

{% block title %}
<title>{% system with name="SiteName" %}初始化</title>
{% endblock %}

{% block container %}
<div class="layui-container">
    <div class="install">
        <div class="layui-card">
            <div class="layui-card-header">{% system with name="SiteName" %}初始化</div>
            <div class="layui-card-body">
                <form class="layui-form" onsubmit="return false;">
                    <div id="mysql-config" style="display: block;">
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据库地址</label>
                            <div class="layui-input-inline">
                                <input type="text" name="host" value="localhost" required  lay-verify="required" placeholder="一般是localhost" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据库端口</label>
                            <div class="layui-input-inline">
                                <input type="text" name="port" value="3306" required  lay-verify="required" placeholder="一般是3306" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据库名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="database" value="irisweb" required  lay-verify="required" placeholder="安装到哪个数据库" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-aux-word">如果数据库不存在，程序则会尝试创建它</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据库用户</label>
                            <div class="layui-input-inline">
                                <input type="text" name="user" required  lay-verify="required" placeholder="填写数据库用户名" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据库密码</label>
                            <div class="layui-input-inline">
                                <input type="password" name="password" required  lay-verify="required" placeholder="填写数据库密码" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <hr>
                    <div class="layui-form-item">
                        <label class="layui-form-label">后台用户名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="admin_user" value="admin" required  lay-verify="required" placeholder="用于登录管理博客" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">后台密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="admin_password" value="12345678" required  lay-verify="required" placeholder="登录密码" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <hr>
                    <div class="layui-form-item">
                        <label class="layui-form-label">网站地址</label>
                        <div class="layui-input-inline">
                            <input type="text" name="base_url" value="{{baseUrl}}" required  lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-aux-word">指该网站的网址，如：https://www.kandaoni.com，用来生成全站的绝对地址</div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="install">确认初始化</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}